package com.complex.spring.advance.service.annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class TestAutowireB {
	@Autowired
	@Qualifier("testAutowireA")
	private TestAutowireA testAutowireA;
	
	@Autowired
	public TestAutowireB(@Qualifier("testAutowireA1") TestAutowireA testAutowireA){
		this.testAutowireA = testAutowireA;
	}
	
	public void print(){
		if(testAutowireA != null){
			testAutowireA.print();
		}
	}
	
	public TestAutowireA getTestAutowireA() {
		return testAutowireA;
	}

	public void setTestAutowireA(TestAutowireA testAutowireA) {
		this.testAutowireA = testAutowireA;
	}

	
}
